<%@ page import="java.util.Map" %>
<%@ page import="java.util.List" %>
<%@ page import="sell.DbTest" %><%--
  Created by IntelliJ IDEA.
  User: webrx
  Date: 2017/6/10
  Time: 7:26
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <meta charset="utf-8">
    <title>衣服商品添加</title>
</head>
<body>
<%
    request.setCharacterEncoding("utf-8");
    DbTest db = new DbTest();
%>
<form action="../fuzhuang_xiao.do" enctype="multipart/form-data" method="post">
    名称：<input type="text" name="name" ><br><br>
    类别：
    <select name="gccid" >
        <%
            /*if(goods.get(0).get("id")!=null) {
                List<Map<String, Object>> list01 = mu.query(" fz_goodclass", "*", "where id=" + goods.get(0).get("gccid"), "", "");
                for (Map<String, Object> m : list01) {
                    int num = m.get("path").toString().split(",").length - 1;
                    String ii = "";
                    for (int i = 0; i < num; i++) {
                        if (i == 0) {
                            ii = "+";
                            continue;
                        }
                        ii += "+";
                    }
                    out.print(String.format("<option value=\"%d\" selected>%s</option>", m.get("id"), ii + m.get("name")));
                }
            }*/
            List<Map<String, Object>> list = db.query(" fuzhang", "*", "", "order by concat(path ,id)", "");
            for (Map<String, Object> m : list){
                int num =m.get("path").toString().split(",").length-1;
                String ii ="";
                for(int i=0;i<num;i++){
                    /*if(i==0){ii="+";continue;}*/
                    ii+="+";
                }
                out.print(String.format("<option value=\"%d\">%s</option>",m.get("id"),ii+m.get("fu_name")));

            }
        %>
    </select><br><br>
    图片：<input type="file" name="file"><br><br>
    价格：<input type="text" name="price" ><br><br><br>
    描述：
    <script id="container" name="content" type="text/plain">
            内容赞赏；
    </script>
    <script type="text/javascript" src="../utf8-jsp/ueditor.config.js"></script>
    <script type="text/javascript" src="../utf8-jsp/ueditor.all.js"></script>
    <script type="text/javascript">
        var cfg = {
            lang: 'zh-cn',
            initialFrameWidth: '90%',
            initialFrameHeight: 300,
            elementPathEnabled:false,
            autoHeight:true
        };
        var ue = UE.getEditor('container', cfg);
    </script><br><br>
    <input type="submit" value="提交">
  

</form>

</body>
</html>
